<?php

class Conexion{
    private $local;
    private $user;
    private $senha;    
    private $nome_db;
    private $con;
    
    public function __construct() {
        $this->local = 'localhost';
        $this->user = 'root';
        $this->senha = '';
        $this->nome_db = 'atleta';
        
        $this->con = new mysqli($this->local, $this->user, $this->senha,$this->nome_db);
    }
    
    public function fechar() {        
        $closed = mysqli_close($this->con);
        $closed = NULL;
    }
    
    public function getCon() {
        return$this->con;
     }  
}
?>